package com.bw.jetpacktest.databinding;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.databinding.DataBindingUtil;
import androidx.fragment.app.Fragment;

import com.bw.jetpacktest.R;

public class DataBindingFragment extends Fragment {

    private Entity entity = new Entity();
    private FragmentDatabindingBinding databindingBinding;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        databindingBinding = DataBindingUtil.inflate(inflater, R.layout.fragment_databinding,container,false);
        databindingBinding.setValue(entity);
        return databindingBinding.getRoot();
    }
}
